Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
www
/
admin
/
app
/
Models
/
Filename :
Admin.php
back
Copy
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Laratrust\Traits\LaratrustUserTrait; class Admin extends Authenticatable { use SoftDeletes, LaratrustUserTrait; protected $table = 'admin'; protected $primaryKey = 'admin_id'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'name', 'email', 'password', 'created_at', 'updated_at', 'deleted_at' ]; /** * The attributes that should be hidden for arrays. * * @var array */ protected $hidden = [ 'deleted_at' ]; public function schools() { return $this->belongsToMany(School::class, 'admin_school', 'admin_id', 'school_id'); } }